<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
 <!--  left 시작 -->  
    <script type="text/javascript">
	$(document).ready(function(){
		$("#loginForm").submit(function(){
			if($("#loginForm :input[name=memberId]").val()==""){
				alert("아이디를 입력하세요!");
				return false;
			}
			if($("#loginForm :input[name=memberPassword]").val()==""){
				alert("패스워드를 입력하세요!");
				return false;
			}
		});	
		
		$("#accordian h3").click(function(){
			//slide up all the link lists
			$("#accordian ul ul").slideUp();
			//slide down the link list below the h3 clicked - only if its closed
			if(!$(this).next().is(":visible"))
			{
				$(this).next().slideDown();
			}
		})
		
	});	
	
</script>
 <style>
 	.ui-menu { width: 200px; }
 </style>
 <!----------------------비로그인 ------------------------------------------------>
 
<c:choose>
	<c:when test="${sessionScope.mvo==null&&sessionScope.advo==null}">
		<form id="loginForm" method="post" action="${initParam.root}member/login.do">
			<!-- <input type="hidden" name="command" value="login"> -->
				<table class="login">
					<tr>
						<td><h3>ID</h3> </td><td><input type="text" name="memberId"></td>
					</tr>
					<tr>
						<td><h3>Password</h3> </td><td><input type="password" name="memberPassword"></td>
					</tr>
					<tr>
						<td></td><td ><input width="200px" type="submit" value="로그인"></td>
					</tr>
					<tr>
						<td><a href="${initParam.root}member/findIdView.do">ID 찾기</a></td>
						<td><a href="${initParam.root}member/findPasswordView.do">비밀번호찾기</a></td>
					</tr>
					<tr>
						<td colspan="2"><a href="${initParam.root }member/memberRegisterView.do">회원가입하시겠습니까?</a></td>
					</tr>
				</table>
				
			</form>
		 &nbsp; &nbsp;
		 <br>
		
	</c:when>
		<c:when test="${sessionScope.mvo==null&&sessionScope.advo!=null}">
		 <div id="admin">
			<h3><a href="${initParam.root}admin/deleteRequestCheckList.do">삭제요청리스트</a></h3>
			<h3><a href="${initParam.root }admin/adminMemberList.do?flag=memberNo">관리자회원리스트보기</a></h3>
			<h3><a href="${initParam.root }member/getMyMessageList.do?flag=receive">받은쪽지함</a></h3>
			<h3><a href="${initParam.root }member/getMyMessageList.do?flag=send">보낸쪽지함</a></h3>
			<h3><a href="${initParam.root}member/logout.do">로그아웃</a></h3>
		 </div>
		</c:when>
	<c:otherwise>
	<font>${sessionScope.mvo.memberId}님 환영합니다.</font>
	<hr>
		
		<div id="accordian">
			<ul>	
				<li>
					<h3>상품관련</h3>
					<ul>
	  	  				<li><a href="${initParam.root }auction/auctionRegisterView.do">경매등록하기</a></li>
					</ul>
				</li>
					
			
				<li>
				<h3>내 경매내역</h3>
					<ul>
						<li><a href="${initParam.root}member/wishListView.do">찜목록</a></li>
	  	  				<li><a href="${initParam.root}member/auth_getMyBidList.do">경매입찰내역</a></li>
	   				    <li><a href="${initParam.root}member/auth_getMyAuctionRegisterHistory.do">경매등록내역</a></li>
					</ul>
				</li>
		
			
				<li>
				<h3>내 정보</h3>
					<ul>					
						<li><a href="${initParam.root}member/memberPasswordCheckView.do?command=memberUpdate">회원정보수정하기</a>	</li>
						<li><a href="${initParam.root}member/memberPasswordCheckView.do?command=memberLeave">회원탈퇴</a></li>	
					</ul>
				</li>
				<li><h3>쪽지함</h3>
					<ul>
						<li><a href="${initParam.root }member/getMyMessageList.do?flag=receive">받은쪽지함</a></li>
						<li><a href="${initParam.root }member/getMyMessageList.do?flag=send">보낸쪽지함</a></li>
							</ul>			
				</li>				
			
			</ul>		
		
		</div>
		<a href="${initParam.root}member/logout.do">로그아웃</a><br>
	
	</c:otherwise>
</c:choose>   


<!-- left 끝 -->

 